package work.parabola.keyboardswitch.dao;

import org.apache.ibatis.annotations.Param;
import work.parabola.keyboardswitch.pojo.repository.PlateDo;

import java.util.List;

public interface PlateDoMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(PlateDo record);

    int insertSelective(PlateDo record);

    PlateDo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(PlateDo record);

    int updateByPrimaryKey(PlateDo record);

    int selectCountByNameUserId(@Param("name") String name, @Param("userId") Integer userId);

    PlateDo selectByNameUserId(@Param("name") String name, @Param("userId") Integer userId);

    List<PlateDo> selectByParam(@Param("searchWord") String searchWord,
                                @Param("type") Integer type, @Param("userId") Integer userId);

    List<PlateDo> selectKeyboardByParam(@Param("searchWord") String searchWord,
                                        @Param("type") Integer type, @Param("userId") Integer userId);
}